GtkPrintUnixDialog: Hide unused tabs
authorMarek Kasik <mkasik@redhat.com>
Thu, 5 Jan 2012 12:17:46 +0000 (13:17 +0100)
committerMarek Kasik <mkasik@redhat.com>
Thu, 5 Jan 2012 12:17:46 +0000 (13:17 +0100)
Don't show tabs which are empty. This is related to
the recent GtkTable -> GtkGrid conversion. (#663479)

gtk/gtkprintunixdialog.c

index 15fdaafc2af033897845ea884e9e5cf0e6362e70..44b0fdcb3944b2165a20c5609973eb83de84d5e9 100644 (file)
@@ -1347,7 +1347,7 @@ setup_page_table (GtkPrinterOptionSet *options,
                                            table);
 
   nrows = grid_rows (GTK_GRID (table));
-  if (nrows == 1)
+  if (nrows == 0)
     gtk_widget_hide (page);
   else
     gtk_widget_show (page);
@@ -1521,7 +1521,7 @@ update_dialog_from_settings (GtkPrintUnixDialog *dialog)
                                                table);
 
       nrows = grid_rows (GTK_GRID (table));
-      if (nrows == 1)
+      if (nrows == 0)
         gtk_widget_destroy (table);
       else
         {